import request  from '@/utils/request';

import { BASE_URL } from '@/config/query';

export async function queryPage(params) {
  return request(`${BASE_URL}/qr_code/page`, params)
}

// 查询设备列表
export async function queryDevicePage(params) {
  return request(`${BASE_URL}/device/page`, {...params})
}

// 新增二维码
export async function create(params) {
  return request(`${BASE_URL}/qr_code/create`, params)
}

export async function createArr(params) {
  return request(`${BASE_URL}/qr_code/batch/create`, params)
}

// 删除二维码
export async function remove(params) {
  return request(`${BASE_URL}/qr_code/unbind`, params)
}

export async function exportQrcode(ids) {
  return request(`${BASE_URL}/qr_code/blank/list`, { idList: ids })
}